package com.hongning.railway.ui.main.mine.score.itemviewmodel;

import android.databinding.ObservableField;
import android.support.annotation.NonNull;

import com.hongning.railway.entity.resbean.ResListScoreDetailBean;
import com.hongning.railway.ui.main.mine.score.SocreDetailFragmentViewModel;
import com.hongning.railway.util.TimeUtils;

import java.util.Observable;

import me.goldze.mvvmhabit.base.ItemViewModel;

public class SocreDetailItemViewModel extends ItemViewModel<SocreDetailFragmentViewModel> {
    public ObservableField<String> time = new ObservableField<>();
    public ObservableField<String> event = new ObservableField<>();
    public ObservableField<String> addsocre = new ObservableField<>();
    public SocreDetailItemViewModel(@NonNull SocreDetailFragmentViewModel viewModel, ResListScoreDetailBean data) {
        super(viewModel);
        event.set(data.getExt1());
        time.set(TimeUtils.getFormatTime(data.getEarnscoretime()));
        addsocre.set("+"+data.getScore());
    }
}
